package com.itheima.tlais_web_management.service.impl;

import com.itheima.tlais_web_management.mapper.BookMapper;
import com.itheima.tlais_web_management.pojo.Book;
import com.itheima.tlais_web_management.service.BookService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class BookServiceImpl implements BookService {

    @Autowired
    private BookMapper bookMapper;

    @Override
    public List<Book> list() {

        return bookMapper.list();

    }

    @Override
    public void delete(Integer id) {
        bookMapper.delete(id);
    }

    @Override
    public void insert(Book book) {
        bookMapper.insert(book);
    }
}
